import 'package:base_lib/index.dart';
import 'package:doctor_login_lib/component.dart';
import 'package:doctor_login_lib/repository/http.dart';
import 'package:flutter/cupertino.dart';
import 'package:base_lib/common/widget/reminder/overlay_support/overlay_support.dart';

class DoctorLoginLib {
  static void doInit() {
    App.initializer(
        [DoctorLoginComponent()], DoctorLoginComponent.loginPage, "/");
  }

  static void initWithContext(BuildContext context) {
    ScreenAdapter.getInstance().init(context);
  }

  static void validateDoctorToken(BuildContext context) {
    LoginHttp.validateDoctorToken(SPUtil.getString('token'));
  }
}

class ReminderWrapper extends StatelessWidget {
  final Widget child;

  ReminderWrapper(this.child);

  @override
  Widget build(BuildContext context) {
    return OverlaySupport(child: child);
  }
}
